import java.util.Comparator;
public class Compare implements Comparator<bookname>, java.io.Serializable {
    public int compare(bookname o1, bookname o2) {
        double area1 = o1.getMoney();
        double area2 = o2.getMoney();
        if (area1 < area2)
            return -1;
        else if (area1 == area2)
            return 0;
        else
            return 1;

    }}

